﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Qianli.DirSir.DAL;
using Qianli.DirSir.Model;
namespace Qianli.DirSir.BLL
{
   public class GoodsBLL
    {
       GoodsDAL dal = new GoodsDAL();


       /// <summary>
       /// 显示商品信息
       /// </summary>
       /// <returns></returns>
       public List<GoodsInfo> Goodshow()
       {
           return dal.Goodshow();
       }
       /// <summary>
       /// 显示商品分类
       /// </summary>
       /// <returns></returns>
       public List<GoodsTypeInfo> showGoodsType()
       {
           return dal.showGoodsType();
       }
       /// <summary>
       /// 添加
       /// </summary>
       /// <param name="ss"></param>
       /// <returns></returns>
       public int addGoods(GoodsInfo ss)
       {
           return dal.addGoods(ss);
       }
       /// <summary>
       /// 删除
       /// </summary>
       /// <param name="id"></param>
       /// <returns></returns>
       public int deleteGoods(int id)
       {
           return dal.deleteGoods(id);
       }
       /// <summary>
       /// 根据id获取goods表信息
       /// </summary>
       /// <param name="id"></param>
       /// <returns></returns>
       public GoodsInfo GetGoodsByID(int id)
       {
           return dal.GetGoodsByID(id);
       }
       /// <summary>
       /// 修改物品信息
       /// </summary>
       /// <param name="g"></param>
       /// <returns></returns>
       public int UptGoods(GoodsInfo g)
       {
           return dal.UptGoods(g);
       }
       /// <summary>
       /// 根据姓名搜索物品表信息
       /// </summary>
       /// <param name="GoodsName"></param>
       /// <returns></returns>
       public List<GoodsInfo> SearchGoods(string GoodsName)
       {
           return dal.SearchGoods(GoodsName);
       }
       /// <summary>
       /// 根据商品编号获取goods表信息
       /// </summary>
       /// <param name="id"></param>
       /// <returns></returns>
       public List<GoodsInfo> GetGoodsByGoodsCoding(string GoodsCoding)
       {
           return dal.GetGoodsByGoodsCoding(GoodsCoding);
       }
    }
}
